﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Localidade : System.Web.UI.Page
{

    #region Page_Load
    protected void Page_Load(object sender, EventArgs e)
    {
        CarregarGrid();
    }
    #endregion

    #region CarregarGrid
    void CarregarGrid()
    {
        LocalidadeGridView.DataSource = Metodos.LocalizacaoListar(DescricaoTextBox.Text);
        LocalidadeGridView.DataBind();
    }
    #endregion

    #region PesquisarButton_Click
    protected void PesquisarButton_Click(object sender, EventArgs e)
    {
        CarregarGrid();
    }
    #endregion

    #region LocalidadeGridView_PageIndexChanging
    protected void LocalidadeGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        LocalidadeGridView.PageIndex = e.NewPageIndex;
        CarregarGrid();
    }
    #endregion

    #region NovoLinkButton_Click
    protected void NovoLinkButton_Click(object sender, EventArgs e)
    {
        Server.Transfer("LocalizacaoIncluir.aspx");
    }
    #endregion

}
